@using FytSoa.Application.Exam
@using FytSoa.Common.Param
@inject ExamTeacherService _teacherService
@{
    var nav = ViewData["Nav"];
    var navActive = 0;
    if (nav != null)
    {
        navActive = Convert.ToInt32(ViewData["Nav"]);
    }
    var teacherList = await _teacherService.GetPagesAsync(new PageParam() { Limit = 5 });
}
<!-- sidebar -->
<div class="main_sidebar">
    <div class="side-overlay" uk-toggle="target: #wrapper ; cls: collapse-sidebar mobile-visible"></div>

    <!-- sidebar header -->
    <div class="sidebar-header">
        <h4> Navigation</h4>
        <span class="btn-close" uk-toggle="target: #wrapper ; cls: collapse-sidebar mobile-visible"></span>
    </div>

    <!-- sidebar Menu -->
    <div class="sidebar">
        <div class="sidebar_innr" data-simplebar>

            <div class="sections">
                <h3> 导航 Browse </h3>
                <ul>
                    <li class="@(navActive == 0 ? "active" : "")">
                        <a href="/">
                            <i class="uil-home-alt"></i> <span> 首页 </span>
                        </a>
                    </li>
                    <li class="@(navActive == 1 ? "active" : "")">
                        <a href="/video">
                            <i class="uil-laptop"></i> <span> 点播 </span>
                        </a>
                    </li>
                    <li class="@(navActive == 2 ? "active" : "")">
                        <a href="/live">
                            <i class="uil-play-circle"></i> <span> 直播 </span>
                        </a>
                    </li>
                    <li class="@(navActive == 3 ? "active" : "")">
                        <a href="/graphic">
                            <i class="uil-image"></i> <span> 图文 </span>
                        </a>
                    </li>
                    <li class="@(navActive == 4 ? "active" : "")">
                        <a href="/lecturer">
                            <i class="uil-user"></i> <span> 讲师 </span>
                        </a>
                    </li>
                    <li class="@(navActive == 5 ? "active" : "")">
                        <a href="/knowledge">
                            <i class="uil-database"></i> <span> 知识库 </span>
                        </a>
                    </li>
                </ul>
            </div>


            <div class="sections">
                <h3> 讲师 TEACHER </h3>
                <ul>
                    @{
                        foreach (var item in teacherList.Items)
                        {
                            <li>
                                <a href="/lecturer/single/@item.Id">
                                    <img src="@item.Avatar.UrlReplace()" alt="@Html.Raw(item.Name)">
                                    <span> @Html.Raw(item.Name) </span> <span class="dot-notiv"></span>
                                </a>
                            </li>
                        }
                    }
                </ul>

                <!-- view more subcription-->
                <div class="uk-flex uk-flex-center mb-3">
                    <a href="/lecturer" class="button default circle px-5">
                        <i class="uil-plus mr-2"></i> 所有讲师
                    </a>
                </div>

            </div>

            <div class="sections">
                <h3> PAGES </h3>
                <ul>
                    <li>
                        <a href="/user/setting">
                            <i class="uil-cog"></i> <span> 设置 </span>
                        </a>
                    </li>
                    <li>
                        <a href="/user/help">
                            <i class="uil-info-circle"></i> <span> 帮助 </span>
                        </a>
                    </li>
                    <li>
                        <a href="/user/message">
                            <i class="uil-bell"></i> <span> 消息 </span>
                        </a>
                    </li>
                    <li>
                        <a href="javascript:void(0)">
                            <i class="uil-history"></i> <span> 历史 </span>
                        </a>
                        <ul>
                            <li>
                                <a href="/user/history?type=video"> 点播 </a>
                                <a href="/user/history?type=live"> 直播 </a>
                            </li>
                        </ul>

                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>